<!DOCTYPE html>
<html layout:decorator="fragments/layout" th:with="index='good',son='add'" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:layout="http://www.thymeleaf.org/" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title>增加商品</title>
    <style>
        .tag [data-role="remove"]::after {
            content: "x";
            padding: 0px 2px;
        }

        .tag [data-role="remove"] {
            margin-left: 8px;
            cursor: pointer;
        }

        .tag {
            margin-right: 5px;
        }

        .table-bordered > tbody > tr > td {
            border: 0px;
        }

        table.dataTable thead th {
            border: 0px;
        }

        table.dataTable.no-footer {
            border: 0px;
        }

    </style>


</head>
<body>
<div layout:fragment="modal">
    <div class="modal" id="createModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                    <h4 class="modal-title">添加管理员</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">帐号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="c-username" placeholder="请输入帐号"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" id="c-password" placeholder="请输入密码"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">确认密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" id="c-password1" placeholder="请再次输入密码"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="createModalAdd">添加</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal" id="authModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                    <h4 class="modal-title">管理员授权</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">帐号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="auth-username" disabled/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">权限组</label>
                                <div class="col-sm-9">
                                    <select type="password" class="form-control" id="auth-role">
                                        <option value="-1">请选择权限组</option>
                                        <option value="1">超级管理员</option>
                                        <option value="2">用户运营组</option>
                                    </select>
                                </div>
                                <button type="button" class="btn btn-primary col-sm-1" id="auth-add"
                                        onclick="addAuth()"><i
                                        class="fa fa-plus"></i></button>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">已选</label>
                                <div class="col-sm-8" id="auth-group">
                                    <span class="tag label label-default">Sydney<span
                                            data-role="remove"></span></span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="authModalConfirm">授权确认</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal" id="modifyModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                    <h4 class="modal-title">修改密码</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">帐号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="m-username" placeholder="请输入帐号"
                                           disabled/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">新密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" id="m-password" placeholder="请输入新密码"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">确认新密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" id="m-password1"
                                           placeholder="请再次输入新密码"/>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="modifyModalModify">修改密码</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal right fade" id="choseBrandModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                    <h4 class="modal-title">选择品牌</h4>
                </div>
                <div class="modal-body">
                    <div class="box-body">
                        <div class="row">
                            <div class="tableTitle pull-left" style="font-size: 14px">选择品牌</div>
                        </div>
                        <div class="row" style="padding-top: 10px">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <input class="form-control" id="a-name123123">
                                </div>
                            </div>
                        </div>

                        <div class="row" style="border-top:1px solid rgba(0,0,0,0.1)">

                        </div>


                        <div class="row" style="border:1px solid rgba(0,0,0,0.1);margin-top: 10px;">
                            <div class="col-sm-4" style="padding-top: 10px;padding-bottom: 10px">

                                <img style="width: 100px;height: 100px" src="http://placehold.it/100x100/e6e6e6/e6e6e6">
                            </div>
                            <div class="col-sm-6">
                                <div style="padding-top: 50px">品牌名字</div>
                            </div>
                            <div class="col-sm-2">
                                <div style="padding-top: 50px">aaaa</div>
                            </div>
                        </div>


                    </div>
                </div>
                <div class="modal-footer">
                    <button class=" btn btn-default">取消</button>
                    <button class=" btn btn-primary ">确认</button>
                </div>
            </div>
        </div>
        <!-- end 弹出层 moda -->
    </div>
</div>
<div layout:fragment="content">
    <section class="content">
        <div class="box">
            <div class="box-header">
                <div class="tableTitle pull-left" style="font-size: 14px">新建商品</div>

                <button class="btn btn-default btn-xs pull-left" style="margin-left: 20px"
                        onclick="javascrtpt:window.location.href='/goods'">返回列表
                </button>

            </div>
            <div class="box-header">
                <div class="" style="font-size: 14px;color: #999999">提示:请先完善你的商品信息</div>
                <!-- /.box-header -->
            </div>
            <div class="box-header">
                <div class="col-sm-6" style="padding-left: 0px">
                    <ul id="myTab" class="nav nav-tabs nav-justified">
                        <li id="good-detail" class="active" style="border: 2px">
                            <a href="#tab-good-detail" data-toggle="tab" style="font-size: 14px">商品信息</a></li>
                        <li id="category" class="disabled"><a href="#tab-category" data-toggle="tab"
                                                              style="font-size: 14px" onshow="tab">类目属性</a></li>
                        <li id="sku" class="disabled"><a href="#tab-sku" data-toggle="tab"
                                                         style="font-size: 14px" onshow="tab">规格设置</a></li>
                        <li id="high-setting" class="disabled"><a href="#tab-high-setting" data-toggle="tab"
                                                                  style="font-size: 14px" onshow="tab">高级设置</a></li>
                        <li id="media" class="disabled"><a href="#tab-media" data-toggle="tab"
                                                           style="font-size: 14px" onshow="tab">媒体库</a></li>

                    </ul>
                </div>
            </div>


            <div id="myTabContent" class="tab-content">
                <!--基础信息-->
                <div class="tab-pane fade in active" id="tab-good-detail">
                    <div class="box-header">
                        <div class="col-sm-10">
                        <div class="tableTitle pull-left" style="font-size: 14px">基础信息</div>
                        <button class="btn btn-primary pull-right"style=";width: 100px"onclick="addGood()">保存</button>
                        <button class="btn btn-default pull-right" style="margin-right: 20px;width: 100px" >取消</button>
                        </div>
                    </div>
                    <div class="box-body">

                        <div class="row" style="padding-top: 10px">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>名称</label>
                                    <input class="form-control" id="a-name">
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>商品编号</label>
                                    <input class="form-control" id="a-num">
                                </div>
                            </div>
                        </div>
                        <!--品牌-->
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>品牌</label>
                                    <input class="form-control" id="s-brand">
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">品牌</label>
                                    <div>
                                        <i class="fa   fa-plus-square" data-toggle="modal"
                                           data-target="#choseBrandModel" style="font-size: 34px"></i>
                                    </div>
                                </div>


                            </div>
                        </div>
                        <!--类别两个-->
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>类别</label>
                                    <select class="form-control" id="a-category1">
                                        <option value="">食品</option>
                                        <option value="0">电器</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label style="visibility: hidden">状态</label>
                                    <select class="form-control" id="a-category2">
                                        <option value="">烧烤</option>
                                        <option value="0">饮料</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <!--是否新品热销-->
                        <div class="row">
                            <div class="col-sm-2">
                                <div class="form-group">
                                    <label>是否新品</label>
                                    <i class="fa   fa-check-square-o" style="font-size: 20px"></i>
                                </div>
                            </div>
                            <div class="col-sm-2">
                                <div class="form-group">
                                    <label>热销</label>
                                    <i class="fa   fa-check-square-o" style="font-size: 20px"></i>
                                </div>
                            </div>
                        </div>
                        <!--主图-->
                        <div class="row">
                            <div class="col-sm-4">
                                <div>
                                    <label>主图</label></div>
                                <img id="c-cover" name="cover" width="200px" height="100px"src="http://placehold.it/100x100/e6e6e6/e6e6e6"/>
                                <input id="cc-cover" name="cover" hidden value=""/>
                                <!--<img style="width: 200px;height: 100px" src="http://placehold.it/100x100/e6e6e6/e6e6e6">-->
                                <i class="fa   fa-cloud-upload" id="c-selectfiles" style="font-size: 30px"></i>
                                <i class="fa    fa-folder" style="font-size: 30px"></i>

                            </div>

                        </div>

                        <div style="margin-top: 10px; ">
                            <label>图片展示栏</label>
                            <i class="fa   fa-cloud-upload" id="m-selectfiles"
                               style="font-size: 30px"></i>
                            <i class="fa fa-folder" style="font-size: 30px">

                            </i>
                            <div class="form-group" hidden="">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-8">
                                    <div id="c-ossfile">你的浏览器不支持flash,Silverlight或者HTML5！</div>
                                </div>
                            </div>
                        </div>

                        <!--多图上传-->
                        <div class="row" style="padding-top: 10px">
                            <div class="col-sm-10"
                                 style="border: 1px solid rgba(0,0,0,0.1);padding: 0;margin-left: 15px">
                                <div id="m-imgContent">
                                    <div class="form-group" id="m-imgGroup">
                                        <div class="col-md-2 img-item" id="noPic"
                                             style="border: 1px solid rgba(86,61,124,.2);margin-left: 15px;margin-bottom: 15px;">
                                            <div class="row">
                                                <div class="col-md-2 no-padding">
                                                    <button type="button" class="move pull-right"
                                                            style="background: rgba(255, 255, 255, 0.3);border: transparent;visibility: hidden">
                                                        <i class="fa fa-angle-double-left"></i></button>
                                                </div>
                                                <div class="col-md-2 no-padding pull-right">
                                                    <button type="button" class="close pull-left" aria-hidden="true" style="visibility: hidden"
                                                            onclick="deleteSelf(this)">×
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="row m-cover">
                                                <div class="col-md-12 mm-cover no-padding"><img
                                                        id="&quot; + option.imgId + &quot;"
                                                        src="http://placehold.it/100x100/e6e6e6/e6e6e6" height="100px"
                                                        width="100%" style="border-top: 1px solid rgba(86,61,124,.2);">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label"></label>
                                    <div class="col-sm-8">
                                        <div id="m-ossfile">你的浏览器不支持flash,Silverlight或者HTML5！</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--品牌-->



                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>关键词</label>
                                    <input class="form-control" id="a-keywords">
                                </div>
                            </div>

                        </div>


                        <!--简介-->
                        <div class="row">
                            <div class="col-sm-8">
                                <div class="form-group">
                                    <label>简介</label>
                                    <textarea class="form-control" id="s-intro"></textarea>
                                </div>
                            </div>

                        </div>

                        <!--详情-->
                        <div class="row">
                            <div class="col-sm-8">
                                <div class="form-group">
                                    <label>详情</label>
                                    <textarea class="form-control" id="s-detail"></textarea>
                                </div>
                            </div>

                        </div>
                    </div>

                </div>
                <!--品类信息-->
                <div class="tab-pane fade " id="tab-category">
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">品类类目</div>
                    </div>
                    <div class="box-body">
                        <!--类别两个-->
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>类别</label>
                                    <select class="form-control" id="a-category1">
                                        <option value="">食品</option>
                                        <option value="0">电器</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label style="visibility: hidden">状态</label>
                                    <select class="form-control" id="a-category2">
                                        <option value="">烧烤</option>
                                        <option value="0">饮料</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="box">
                            <div class="box-header">
                                <div class="" style="font-size: 14px">基本属性</div>
                            </div>


                            <!--品牌-->
                            <div class="box-body">
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label>品牌</label>
                                            <input class="form-control" id="s-brand">
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label>品牌</label>
                                            <input class="form-control" id="s-brand">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label>品牌</label>
                                            <input class="form-control" id="s-brand">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">品类属性</div>
                    </div>
                    <div class="box-body">
                        <!--类别两个-->
                        <div class="box">
                            <div class="box-header">
                                <div class="" style="font-size: 14px">基本属性</div>
                            </div>


                            <!--品牌-->
                            <div class="box-body">
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label>品牌</label>
                                            <input class="form-control" id="s-brand">
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label>品牌</label>
                                            <input class="form-control" id="s-brand">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label>品牌</label>
                                            <input class="form-control" id="s-brand">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--规格属性-->
                <div class="tab-pane fade" id="tab-sku">
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">规格属性</div>
                        <div class=" pull-left" style="font-size: 14px;color: #999999;padding-left: 20px">最多支持3个规格属性
                        </div>
                    </div>
                    <!--品牌-->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>品牌</label>
                                    <input class="form-control" id="s-brand">
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">类别</label>
                                    <button class="btn btn-default form-control">添加</button>
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">类别</label>
                                    <button class="btn btn-primary form-control">保存</button>
                                </div>
                            </div>
                        </div>
                        <div class="skuAttribute">
                            <div class="row">
                                <div class="pull-left" style="padding-left: 20px">通用</div>
                                <a class="pull-left" style="padding-left: 10px">编辑</a>
                                <a class="pull-left" style="padding-left: 10px">删除</a>
                            </div>

                            <div class="row">
                                <div style="padding: 20px">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute"> <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                </div>
                            </div>
                            <div class="row">
                                <div class="pull-left" style="padding-left: 20px">通用</div>
                                <a class="pull-left" style="padding-left: 10px">编辑</a>
                                <a class="pull-left" style="padding-left: 10px">删除</a>
                            </div>

                            <div class="row">
                                <div style="padding: 20px">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute"> <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                </div>
                            </div>


                        </div>
                    </div>
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">品类属性</div>
                        <i class="fa fa-th-list pull-right" style="font-size: 24px"></i>
                        <i class="fa fa-table pull-right" style="font-size: 24px;padding-right: 10px"></i>
                    </div>
                    <div id="category-detail">
                        <div class="box-body">
                            <div class="box">
                                <!--品牌-->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-body">
                            <!--类别两个-->
                            <div class="box">
                                <div class="box-header">
                                    <div class="" style="font-size: 14px">基本属性</div>
                                </div>


                                <!--品牌-->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--规格属性-->
                <div class="tab-pane fade" id="tab-high-setting">
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">规格属性</div>
                        <div class=" pull-left" style="font-size: 14px;color: #999999;padding-left: 20px">最多支持3个规格属性
                        </div>
                    </div>
                    <!--品牌-->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>品牌</label>
                                    <input class="form-control" id="s-brand">
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">类别</label>
                                    <button class="btn btn-default form-control">添加</button>
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">类别</label>
                                    <button class="btn btn-primary form-control">保存</button>
                                </div>
                            </div>
                        </div>
                        <div class="skuAttribute">
                            <div class="row">
                                <div class="pull-left" style="padding-left: 20px">通用</div>
                                <a class="pull-left" style="padding-left: 10px">编辑</a>
                                <a class="pull-left" style="padding-left: 10px">删除</a>
                            </div>

                            <div class="row">
                                <div style="padding: 20px">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute"> <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                </div>
                            </div>
                            <div class="row">
                                <div class="pull-left" style="padding-left: 20px">通用</div>
                                <a class="pull-left" style="padding-left: 10px">编辑</a>
                                <a class="pull-left" style="padding-left: 10px">删除</a>
                            </div>

                            <div class="row">
                                <div style="padding: 20px">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute"> <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                </div>
                            </div>


                        </div>
                    </div>
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">品类属性</div>
                        <i class="fa fa-th-list pull-right" style="font-size: 24px"></i>
                        <i class="fa fa-table pull-right" style="font-size: 24px;padding-right: 10px"></i>
                    </div>
                    <div id="category-detail">
                        <div class="box-body">
                            <div class="box">
                                <!--品牌-->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-body">
                            <!--类别两个-->
                            <div class="box">
                                <div class="box-header">
                                    <div class="" style="font-size: 14px">基本属性</div>
                                </div>


                                <!--品牌-->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--规格属性-->
                <div class="tab-pane fade" id="tab-media">
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">规格属性</div>
                        <div class=" pull-left" style="font-size: 14px;color: #999999;padding-left: 20px">最多支持3个规格属性
                        </div>
                    </div>
                    <!--品牌-->
                    <div class="box-body">
                        <div class="row">
                            <div class="col-sm-4">
                                <div class="form-group">
                                    <label>品牌</label>
                                    <input class="form-control" id="s-brand">
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">类别</label>
                                    <button class="btn btn-default form-control">添加</button>
                                </div>
                            </div>
                            <div class="col-sm-1">
                                <div class="form-group">
                                    <label style="visibility: hidden">类别</label>
                                    <button class="btn btn-primary form-control">保存</button>
                                </div>
                            </div>
                        </div>
                        <div class="skuAttribute">
                            <div class="row">
                                <div class="pull-left" style="padding-left: 20px">通用</div>
                                <a class="pull-left" style="padding-left: 10px">编辑</a>
                                <a class="pull-left" style="padding-left: 10px">删除</a>
                            </div>

                            <div class="row">
                                <div style="padding: 20px">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute"> <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                </div>
                            </div>
                            <div class="row">
                                <div class="pull-left" style="padding-left: 20px">通用</div>
                                <a class="pull-left" style="padding-left: 10px">编辑</a>
                                <a class="pull-left" style="padding-left: 10px">删除</a>
                            </div>

                            <div class="row">
                                <div style="padding: 20px">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute"> <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                    <input class="inputSkuAttribute">
                                </div>
                            </div>


                        </div>
                    </div>
                    <div class="box-header">
                        <div class="tableTitle pull-left" style="font-size: 14px">品类属性</div>
                        <i class="fa fa-th-list pull-right" style="font-size: 24px"></i>
                        <i class="fa fa-table pull-right" style="font-size: 24px;padding-right: 10px"></i>
                    </div>
                    <div id="category-detail">
                        <div class="box-body">
                            <div class="box">
                                <!--品牌-->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-body">
                            <!--类别两个-->
                            <div class="box">
                                <div class="box-header">
                                    <div class="" style="font-size: 14px">基本属性</div>
                                </div>


                                <!--品牌-->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <label>品牌</label>
                                                <input class="form-control" id="s-brand">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

</div>

<div layout:fragment="js">
    <script type="text/javascript" th:src="@{/js/imageUploader.js}"></script>
    <script type="text/javascript" th:src="@{/js/plupload/js/plupload.full.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/alioss/uploads.js}"></script>
    <script th:inline="javascript">
        $(document).ready(function () {
            // 添加图片
            var option = {
                urlName: 'activity/cover/',     //用于掺入图片url
                uploaderName: 'uploader1',      //新建plupload对象名
                uploaderBtn: 'c-selectfiles',   //上传按钮id
                progressBtn: 'c-ossfile',       //进度条显示块id
                img: 'c-cover',                 //<img>的id
                img2: 'cc-cover'                //<input>图片url的id
            };
            imageUploader(option);
            // 修改图片
            var option2 = {
                urlName: 'activity/cover/',       //用于掺入图片url
                uploaderName: 'uploader2',        //新建plupload对象名
                uploaderBtn: 'm-selectfiles',     //上传按钮id
                progressBtn: 'm-ossfile',         //进度条显示块id
                gallery: 'm-imgGroup',            //图片组的id
                imgId: 'activityImg',              //<img>标签id
                colmd:2
            };
            multipleUploader(option2);
            moveToLeft(option2);
        })

        function addGood() {

            var gallery = "";
            $(".m-cover .mm-cover img").each(function () {
                gallery = gallery + $(this).attr("src") + ",";
            });


            $.ajax({
                type: "POST",
                url: "/goods/add",
                data: {
                    "name": $("#a-name").val(),
                    "num": $("#a-num").val(),
                    "brandId": 1,
                    "category1Id": 1,
                    "category2Id": 1,
                    "primaryPicUrl": $("#cc-cover").val(),
                    "gallery": gallery,
                    "keywords": $("#a-keywords").val(),
                    "intro": $("#intro").val(),
                    "newSort": 1,

                },
                success: function (result) {
                    if (result.code == 200) {
                        console.log(result.code);
                        toastr.success('添加成功');
                    } else {
                        toastr.error(result.msg);
                    }
                },
                statusCode: {
                    400: function () {
                        toastr.warning('服务器忙,请稍后重试！');
                    }
                }
            });
        }


//        $('a[href="#tab-category"]').on('show.bs.tab', function(e) {
//            e.preventDefault();
//        });
//
//        $('a[href="#tab-sku"]').on('show.bs.tab', function(e) {
//            e.preventDefault();
//        });
//        $('a[href="#tab-high-setting"]').on('show.bs.tab', function(e) {
//            e.preventDefault();
//        });
//        $('a[href="#tab-media"]').on('show.bs.tab', function(e) {
//            e.preventDefault();
//        });


    </script>


</div>
</body>
</html>
